﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Common/MasterPages/Blank.Master" AutoEventWireup="true" CodeBehind="PrintLabels.aspx.cs" Inherits="DMS.Web.Modules.ArchivesManagement.PrintLabels" %>
<asp:Content ID="Content1" ContentPlaceHolderID="PageTitle" runat="server">
    打印标签
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
    <link type="text/css" rel="stylesheet" href="/Themes/Default/style.css" />
    <style type="text/css">
            @media print
	     {  
	      .Noprint{DISPLAY:none;}  
	      .PageNext{PAGE-BREAK-AFTER:always}  
	     }
	 
	     .printTable .normalTable
	     {
	         margin: 20px;
	         width:520px;
	         border-collapse:collapse;
	         border:none;
	         font-size:13pt;
	     }
	 
	     .printTable td
	     {
	         border:solid #000 1px;
	         padding:7px;
	                	         
	     }
	     
	     .form_title
	     {
	         width:170px;
	     }
	     
	     .form_content
	     {
	         width:340px;
	         text-overflow:ellipsis;	
	         overflow: hidden; 
	         white-space:nowrap;  
	     }
	     
	     .pageDiv
	     {
	         width:649px;height:977px;border: 1px;
	     }
	     
	     .ToolBarContainer {position:fixed; top:0;_position:relative; z-index:100; _top:expression(offsetParent.scrollTop+0);} 
     </style>
     <script type="text/javascript">
         function pagesetup_null() {
             try {
                 var RegWsh = new ActiveXObject("WScript.Shell");
                 RegWsh.RegWrite("HKEY_CURRENT_USER\\Software\\Microsoft\\Internet Explorer\\PageSetup\\header", "");
                 RegWsh.RegWrite("HKEY_CURRENT_USER\\Software\\Microsoft\\Internet Explorer\\PageSetup\\footer", "");
             } catch (e) {
             }
         }

         function doPrint() {
             pagesetup_null();
             window.print();
         }
    </script>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainHolder" runat="server">
<div id="itemdetail" class="Noprint">
            <div id="object1" class="button">
            <table width="100%" cellpadding="0" cellspacing="0">
                <tr>
                    <th>
                        <div id="ToolBarContainer">
                            <div id="Div1">
                                <div class="ToolBarItem" style="padding-left: 10px">
                                <input type="image" name="FlowToolBar1$Btn_Exit" id="Image1" title="打印"
                                        src="/Themes/Default/btn_idt_print.png" onclick="javascript:doPrint();" style="border-width: 0px;" />
                                   <span class="ToolBarText">
                                        <a id="lb_print" href="javascript:doPrint();">打印</a>
                                    </span>
                                </div>
    
                            </div>
                        </div>
                    </th>
                    <td>
                    </td>
                </tr>
            </table>
        </div>
</div>

<div  style=" width:100%;" class="printTable">
<center> 
    <asp:Repeater ID="Repeater1" runat="server">
        <HeaderTemplate>            
        </HeaderTemplate>
        <ItemTemplate>
        <%# Container.ItemIndex%5==0?"<span class='Noprint'><hr/>第"+((Container.ItemIndex)/5+1)+"页</span><div class='pageDiv'>":""%>
            <table class="normalTable">
                <tr>
                <td class="form_title">档案盒编号：</td><td><div><%# DataBinder.Eval(Container.DataItem, "BoxCode") %></div></td>
                </tr>
                <tr>
                <td class="form_title">档案盒所在位置：</td><td><div class="form_content"><%# DataBinder.Eval(Container.DataItem, "BoxPosition") %></div></td>
                </tr>
                <tr>
                    <td class="form_title"><%# fromType=="ZHInfo"?"档案名称：":(fromType=="GR"?"个人社保号：":"单位社保号：") %></td>
                    <td><div class="form_content">
                        <%# fromType=="ZHInfo"?(DataBinder.Eval(Container.DataItem, "Name")):(DataBinder.Eval(Container.DataItem, "InsuranceCode"))  %>
                        </div></td>
                </tr>
                <tr>
                    <td class="form_title"><%# fromType=="ZHInfo"?"所属年度：":(fromType=="GR"?"缴费人姓名：":"单位名称：") %></td>
                    <td>
                        <div class="form_content">
                        <%# fromType=="ZHInfo"
                            ?(DataBinder.Eval(Container.DataItem, "BelongYear")+"年")
                            :(fromType=="GR"?(DataBinder.Eval(Container.DataItem, "PayerName")):(DataBinder.Eval(Container.DataItem, "UnitName"))) %>
                        </div>
                    </td>
                </tr>
                <tr>
                <td class="form_title"><%# fromType=="ZHInfo"?"档案形成日期：":"纳税编码：" %></td>
                <td><div class="form_content">
                    <%# fromType=="ZHInfo"
                    ?(DataBinder.Eval(Container.DataItem, "InitDate")!=null?((DateTime)DataBinder.Eval(Container.DataItem, "InitDate")).ToString("yyyy-MM-dd"):"")
                            :(DataBinder.Eval(Container.DataItem, "TaxCode")) %>
                    </div></td>
                </tr>
            </table>
        <%# (Container.ItemIndex-4)%5==0?"</div>":""%>
        </ItemTemplate>
        <FooterTemplate>
        </FooterTemplate>
    </asp:Repeater>
    </center>
    </div>
</asp:Content>
